package com.guigu.buy.controller;

import com.guigu.buy.pojo.GatherType;
import com.guigu.buy.service.IGatherTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author com.guigu
 * @since 2024-05-15
 */
@CrossOrigin
@Controller
@RequestMapping("/buy/gatherType")
public class GatherTypeController {
    @Autowired
    private IGatherTypeService gatherTypeService;
    //查询所有仓库类型
    @RequestMapping("/list")
    @ResponseBody
    public List<GatherType> list(){
        return gatherTypeService.list();
    }
}
